home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Tools⁄Additions / MacAnalyst32 / MacAnalyst 3.2 / Analysis Examples / Analyzer.PD / Analyzer.PD
Encoding:
Text File  |  1990-12-09  |  1.7 KB  |  74 lines  |  [TEXT/DESA]

  1. { BuildTrigger }
  2. KeyEntry : data in
  3. Trigger : data out
  4. NewTrigger : control in
  5. BODY: 
  6.   if NewTrigger then
  7.     while KeyEntry <> Return do
  8.        Add KeyEntry to string
  9.     Build Trigger from string
  10.     Save Trigger 
  11. ____________________________________________________
  12.  
  13. { ControlAnalyzer }
  14. Command : control in
  15. TriggerEnable : control out
  16. TriggerFound : control in
  17. NewTrigger : control out
  18. ReceiverEnable : control out
  19. BODY: 
  20.   if Command issued from keyboard then
  21.     case Command of
  22.       LOAD TRIGGER:  
  23.         ReceiverEnable = FALSE 
  24.         NewTrigger = TRUE 
  25.         TriggerEnable = FALSE
  26.       START SCAN:
  27.         ReceiverEnable = TRUE 
  28.         NewTrigger = FALSE 
  29.         TriggerEnable = TRUE
  30.       STOP SCAN:
  31.         ReceiverEnable = FALSE 
  32.         NewTrigger = FALSE 
  33.         TriggerEnable = FALSE
  34.     end
  35.   if TriggerFound then
  36.     Increment number of matching packets
  37.     if number of matching packets fills screen then
  38.       ReceiverEnable = FALSE
  39. ____________________________________________________
  40.  
  41. { ReceivePacket }
  42. Packet : data in
  43. Packet : data out
  44. ReceiverEnable : control in
  45. BODY: 
  46.   if ReceiverEnable then
  47.     Read Packet from Data Highway and save to PacketBuffer buffer
  48. ____________________________________________________
  49.  
  50. { ScanForMatch }
  51. Packet : data in
  52. MatchingPacket : data out
  53. TriggerEnable : control in
  54. TriggerFound : control out
  55. Trigger : data in
  56. BODY: 
  57. if TriggerEnable then
  58.   while NOT TriggerFound do
  59.     if Trigger matches Packet then
  60.       Save Matching Packet and set TriggerFound = TRUE
  61. ____________________________________________________
  62.  
  63. { DrawScreen }
  64. AnalyzerDisplay : data out
  65. MatchingPacket : data in
  66. Trigger : data in
  67. BODY: 
  68.   Create AnalyzerDisplay from Trigger and MatchingPacket
  69. ____________________________________________________
  70.  
  71.  
  72.  
  73.  
  74.